package com.zoro.barn.business.service.sqldocument.server.facade;

import com.zoro.barn.business.service.sqldocument.server.BarnUserServer;
import com.zoro.barn.dto.system.BarnUserInfoDto;
import com.zoro.barn.dto.system.userinfodto.GetUserInfosReq;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author zhaoxingwu
 */
@Component
public class BarnUserServerFacade {

    private final BarnUserServer barnUserServer;

    public BarnUserServerFacade(BarnUserServer barnUserServer) {
        this.barnUserServer = barnUserServer;
    }

    public List<BarnUserInfoDto> getUserInfos(String[] userIds) throws Exception {
        GetUserInfosReq userInfosReq = new GetUserInfosReq();
        userInfosReq.setIds(userIds);
        return this.barnUserServer.getUserInfos(userInfosReq);
    }
}
